]> dgit.raspbian.org Git - gnome-shell.git/commit
screencastService: Streamline teardown and error handling
authorJonas Dreßler <verdre@v0yd.nl>
Fri, 28 Jan 2022 22:50:35 +0000 (23:50 +0100)
committerJonas Dreßler <verdre@v0yd.nl>
Tue, 25 Apr 2023 15:17:41 +0000 (17:17 +0200)
commitcbfbdc4be51ffdfaf722b10d3320fa394a054a5e
tree28f3ab94913618664a84c522d14ec324e2d833a8
parente6196b5b9fbd0ec6e090e8720746058e5602c76b
screencastService: Streamline teardown and error handling

We're tracking three different state-machines in the Recorder object:
The state of the gstreamer pipeline, the state of the screencast
session, and the sender of our dbus invocation that might vanish.

Properly handling errors that might appear in any of those three "black
boxes" is not easy, especially tearing down the other two when one of
them breaks.

So refactor the error handling here: Add a single error path for each of
those three states we're tracking, and make them all subsequently call
the _bailOutOnError() method. From there we tear down the other states and
call the error callbacks.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2197>
js/dbusServices/screencast/screencastService.js